export function connectWebViewJavascriptBridge(callback: Function) {
    if (window.WebViewJavascriptBridge) {
        callback(window.WebViewJavascriptBridge)
    } else {
        document.addEventListener('WebViewJavascriptBridgeReady', () => {
            callback(window.WebViewJavascriptBridge)
        })
    }
}
connectWebViewJavascriptBridge(function (bridge: any) {
    bridge.init(function (message: any, resCallback: any) {
        console.log('js got a message', message, resCallback)
    })
})